<template>
	<view  v-if="dataobj.coltype=='edittext' && dataobj.visible"  :style="{'background-color':dataobj.editable?'#f8f8f8':'#fff'}"  style="padding: 8px 18px;color: #666;font-size: 14px; display: flex;flex-direction: row;justify-content: space-between;">
		<view  style="padding: 8px;color: #666;font-size: 14px; display: flex;flex-direction: row;height: 46px;" >
			<textarea maxlength="-1" :disabled="!dataobj.editable" :value="dataobj.colvalue" :placeholder="dataobj.placeholder"  @input="inputitem($event)"></textarea>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			dataobj:{
				type:Object
			},
			
			index2:{
				type:Number
			},
			datalist:{
				type:Array,
				default () {
					return []
				}
			},
			index3:{
				type:Number
			}
		},
		
		mounted:function(res){
			console.log(this.datalist)
		},
		
		methods:{
			inputitem(event){
				var that = this
				var inputvalue = event.detail.value
				that.dataobj.colvalue = inputvalue
				that.dataobj.coldisplay = inputvalue
				that.dataobj.ismodified = true
				that.datalist[that.index2].style = that.dataobj
				that.$emit('changeData',that.index3,that.index2,that.dataobj)
			},
			
		}
	}
	
</script>

<style>
</style>